package com.guan.ordering_sys.generator.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guan.ordering_sys.generator.entity.Refund;
import com.guan.ordering_sys.generator.mapper.RefundMapper;
import com.guan.ordering_sys.generator.service.RefundService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guan.ordering_sys.vo.RefundExamineVo;
import com.guan.ordering_sys.vo.RefundVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 许少萍
 * @since 2021-06-18
 */
@Service
public class RefundServiceImpl extends ServiceImpl<RefundMapper, Refund> implements RefundService {

    @Autowired
    RefundMapper refundMapper;

    @Override
    public IPage<RefundVo> refundList(Page<RefundVo> refundVoPage) {
        IPage<RefundVo> RefundVoIPage = refundMapper.selectRefundList(refundVoPage);
        return RefundVoIPage;
    }

    @Override
    public RefundExamineVo getExamineList(int refundId) {
        RefundExamineVo refundExamineVo = refundMapper.getExamineList(refundId);
        return refundExamineVo;
    }

    @Override
    public int updateExamine(int refundId, String payType, String refundExplian, String examine) {
        int updateResult = refundMapper.updateExamine(refundId,payType,refundExplian,examine);
        return updateResult;
    }
}
